\hypertarget{class_environment}{
\section{Environment Class Reference}
\label{class_environment}\index{Environment@{Environment}}
}


stores all rigid bodies and boundary and manages interaction among rigid bodies, fluids and the boundary  




{\ttfamily \#include $<$Environment.h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_environment_a8b427c4448d8b7536666837521b9e83d}{Environment} ()
\begin{DoxyCompactList}\small\item\em ctor \end{DoxyCompactList}\item 
\hyperlink{class_environment_a8e294735187880dd3d59be10c425b29d}{$\sim$Environment} ()
\begin{DoxyCompactList}\small\item\em dtor \end{DoxyCompactList}\item 
void \hyperlink{class_environment_a818f6926a415a4f19bdcada4f90a10b5}{loadGeometry} ()
\begin{DoxyCompactList}\small\item\em load vbo geometry \end{DoxyCompactList}\item 
void \hyperlink{class_environment_a002c03ff1013fe6396c4925c058da518}{draw} (ngl::TransformStack \_\-txStack, \hyperlink{class_shader_library}{ShaderLibrary} $\ast$io\_\-sman, const std::string \_\-boundaryShader, const std::string \_\-obstacleShader)
\begin{DoxyCompactList}\small\item\em draws the obstacles \end{DoxyCompactList}\item 
void \hyperlink{class_environment_a6070450ab9185f1f1b2222c7e6c74372}{checkAndResolveCollision} (\hyperlink{class_particle}{Particle} \&io\_\-currentParticle, bool \&o\_\-hitBoundary, bool \&o\_\-hitRBD, const bool \_\-fromRBD)
\begin{DoxyCompactList}\small\item\em detect and handles collision among particles (sphere rbd and fluid particle) \end{DoxyCompactList}\item 
void \hyperlink{class_environment_a408cbde98b479f6a5c8779c9d66c62ba}{updateObstacles} (\hyperlink{class_integration}{Integration} $\ast$\_\-integration)
\begin{DoxyCompactList}\small\item\em update the rigid bodies movements and rotations at every simulation iteration \end{DoxyCompactList}\item 
std::vector$<$ std::vector$<$ ngl::Vector $>$ $>$ \hyperlink{class_environment_acea02d31352a606c89b09246ab27f642}{getBoundaryPositionList} ()
\begin{DoxyCompactList}\small\item\em return a 2d list of the faces of the boundary, used for caching \end{DoxyCompactList}\item 
std::vector$<$ std::string $>$ \hyperlink{class_environment_a39d043e06b306ae7c895c1c2bd22a576}{getBoundaryNameList} ()
\begin{DoxyCompactList}\small\item\em return a list of the boundary box name, used for caching \end{DoxyCompactList}\item 
std::vector$<$ std::vector$<$ ngl::Vector $>$ $>$ \hyperlink{class_environment_a2a2c56970fa7f1fa407f3a9345b666f9}{getSpherePositionList} ()
\begin{DoxyCompactList}\small\item\em return a 2d list of the position of spheres, used for caching \end{DoxyCompactList}\item 
std::vector$<$ std::string $>$ \hyperlink{class_environment_aacade06bda2dd048c5cd5783952d9ac0}{getSphereNameList} ()
\begin{DoxyCompactList}\small\item\em return a list of the spheres id, used for caching \end{DoxyCompactList}\item 
std::vector$<$ std::vector$<$ ngl::Vector $>$ $>$ \hyperlink{class_environment_a265b5d911d51ff7cfb5e1eb533862c20}{getCapsulePositionList} ()
\begin{DoxyCompactList}\small\item\em return a 2d list of the position of capsules, used for caching \end{DoxyCompactList}\item 
std::vector$<$ std::string $>$ \hyperlink{class_environment_a9636b19f77061b91c97171dbe810ec95}{getCapsuleNameList} ()
\begin{DoxyCompactList}\small\item\em return a list of the capsules id, used for caching \end{DoxyCompactList}\item 
std::vector$<$ \hyperlink{class_particle}{Particle} $>$ \& \hyperlink{class_environment_a551bdddbcebca8a712bc6604919afa1d}{getSphereObstacleList} ()
\begin{DoxyCompactList}\small\item\em return the list of sphere RBD \end{DoxyCompactList}\item 
std::vector$<$ \hyperlink{class_capsule}{Capsule} $>$ \& \hyperlink{class_environment_accdbc629b803fb3e63c655541eb21a77}{getCapsuleObstacleList} ()
\begin{DoxyCompactList}\small\item\em return the list of capsule RBD \end{DoxyCompactList}\item 
bool \hyperlink{class_environment_a3083a32a2114551dc8ca4339a0579346}{getObstacleEnabled} () const 
\begin{DoxyCompactList}\small\item\em return whether RBD interaction is enabled \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_environment_abb9767250c06bb5a1aa2e8fab34515f9}{getBoundaryDimension} () const 
\begin{DoxyCompactList}\small\item\em return the boundary dimension \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_environment_a7ae9db6fe796a2509260ceda13996aec}{getBoundaryPosition} () const 
\begin{DoxyCompactList}\small\item\em return the boundary centre position \end{DoxyCompactList}\item 
bool \hyperlink{class_environment_a8d7d0cccc1270a8c69551df6b0e65773}{getBoundaryBoundTop} () const 
\begin{DoxyCompactList}\small\item\em return whether the top face of the boundary is closed \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_ad3590ccbb3275498fa2c4d4a860da22e}{getBoundaryRestitutionCoefficientForFluid} () const 
\begin{DoxyCompactList}\small\item\em return the restitution coefficient for fluid interaction with boundary \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_ac72e674dc2013635718e9ff1492eae25}{getBoundaryRestitutionCoefficientForRBD} () const 
\begin{DoxyCompactList}\small\item\em return the restitution coefficient for RBD interaction with boundary \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_ab43f66a68b14a626af52ba842b83081b}{getObstacleRestitutionCoefficient} () const 
\begin{DoxyCompactList}\small\item\em return the restitution coefficient for fluid interaction with RBD \end{DoxyCompactList}\item 
int \hyperlink{class_environment_a69da13f2e7dd360703c7627b7e8a2387}{getCapsuleResolution} () const 
\begin{DoxyCompactList}\small\item\em return the resolution of the capsule drawing \end{DoxyCompactList}\item 
bool \hyperlink{class_environment_a2aa2828b3f6727b3d886e62e5abd889f}{getPeriodicWallEnabled} () const 
\begin{DoxyCompactList}\small\item\em return whether the boundary periodic wall is enabled \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_a0ca9bcd0229e30c9f646b5b27268d00b}{getPeriodicWallMaxAmplitude} () const 
\begin{DoxyCompactList}\small\item\em return the maximum amplitude of the periodic wall \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_a2e05358a7666933e38db204f958a3c56}{getPeriodicWallSpeed} () const 
\begin{DoxyCompactList}\small\item\em return the angle speed factor of the periodic wall \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_a6144d18fd74e20a4ac04c28fbbf03fc4}{getAngleOfPeriodicWall} () const 
\begin{DoxyCompactList}\small\item\em return the angle of the periodic wall sine function \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_a691c933b425166768c8404392270e633}{getPeriodicWallAngleIncrement} () const 
\begin{DoxyCompactList}\small\item\em return the angle increment of the periodic wall sine function \end{DoxyCompactList}\item 
void \hyperlink{class_environment_ad171f12be377bce1244f447da5612f96}{setObstacleEnabled} (const bool \_\-v)
\begin{DoxyCompactList}\small\item\em set whether RBD interaction is enabled \end{DoxyCompactList}\item 
void \hyperlink{class_environment_afb15c570b1bd774906f2e242b686bb17}{setBoundaryDimension} (const ngl::Vector \_\-v)
\begin{DoxyCompactList}\small\item\em set the boundary dimension \end{DoxyCompactList}\item 
void \hyperlink{class_environment_a8b753fc5f5800addf2384bd3f23156d3}{setBoundaryPosition} (ngl::Vector \_\-v)
\begin{DoxyCompactList}\small\item\em set the boundary centre position \end{DoxyCompactList}\item 
void \hyperlink{class_environment_acce32142fb09debaa2dbedb0d53f64db}{setBoundaryBoundTop} (const bool \_\-v)
\begin{DoxyCompactList}\small\item\em set whether the top face of the boundary is closed \end{DoxyCompactList}\item 
void \hyperlink{class_environment_a59e4a62fd0f62e7a6c1eeddda80e029f}{setBoundaryRestitutionCoefficientForFluid} (const ngl::Real \_\-v)
\begin{DoxyCompactList}\small\item\em set the restitution coefficient for fluid interaction with boundary \end{DoxyCompactList}\item 
void \hyperlink{class_environment_aa5fb061ccd34a233ee1f47169188afbf}{setBoundaryRestitutionCoefficientForRBD} (const ngl::Real \_\-v)
\begin{DoxyCompactList}\small\item\em set the restitution coefficient for RBD interaction with boundary \end{DoxyCompactList}\item 
void \hyperlink{class_environment_a9cd6f415dee9bb7606238db9fb6bed2b}{setObstacleRestitutionCoefficient} (const ngl::Real \_\-v)
\begin{DoxyCompactList}\small\item\em set the restitution coefficient for fluid interaction with RBD \end{DoxyCompactList}\item 
void \hyperlink{class_environment_a426c72c57fea101de951aca60c15b04b}{setCapsuleResolution} (const int \_\-v)
\begin{DoxyCompactList}\small\item\em set the resolution of the capsule drawing \end{DoxyCompactList}\item 
void \hyperlink{class_environment_aac100a2da9cf9f23a9907c27e3570f9b}{setPeriodicWallEnabled} (const bool \_\-v)
\begin{DoxyCompactList}\small\item\em set whether the boundary periodic wall is enabled \end{DoxyCompactList}\item 
void \hyperlink{class_environment_a505b45d602f5d65a88c8e3a421701ab3}{setPeriodicWallMaxAmplitude} (const ngl::Real \_\-v)
\begin{DoxyCompactList}\small\item\em set the maximum amplitude of the periodic wall \end{DoxyCompactList}\item 
void \hyperlink{class_environment_ac8ab07b9267ab1a17269d5909dce7586}{setPeriodicWallSpeed} (const ngl::Real \_\-v)
\begin{DoxyCompactList}\small\item\em set the angle speed factor of the periodic wall \end{DoxyCompactList}\item 
void \hyperlink{class_environment_a7e4c336d1397445e21668698cb0eb564}{setAngleOfPeriodicWall} (const ngl::Real \_\-v)
\begin{DoxyCompactList}\small\item\em set the angle of the periodic wall sine function \end{DoxyCompactList}\item 
void \hyperlink{class_environment_aed68eac202ef430d581cac865fa83da2}{setPeriodicWallAngleIncrement} (const ngl::Real \_\-v)
\begin{DoxyCompactList}\small\item\em set the angle increment of the periodic wall sine function \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{class_environment_a65ca7a485ba9a0d29fb8bc2d4fb6df5d}{checkAndResolveCollisionWithObstacle} (\hyperlink{class_particle}{Particle} \&io\_\-currentParticle, \hyperlink{class_particle}{Particle} \&\_\-obstacle)
\begin{DoxyCompactList}\small\item\em handle collision between sphere/fluid and sphere \end{DoxyCompactList}\item 
bool \hyperlink{class_environment_a700ce92d40c1ac77b38d7e3c7adea6f8}{checkAndResolveCollisionWithObstacle} (\hyperlink{class_particle}{Particle} \&io\_\-currentParticle, \hyperlink{class_capsule}{Capsule} \&\_\-obstacle)
\begin{DoxyCompactList}\small\item\em handle collision between sphere/fluid and capsule \end{DoxyCompactList}\item 
bool \hyperlink{class_environment_a59081288b51d495f928c0af5006d5cd1}{checkAndResolveCollisionWithBoundary} (\hyperlink{class_particle}{Particle} \&io\_\-currentParticle, const bool \_\-fromRBD)
\begin{DoxyCompactList}\small\item\em handle collision between RBD/fluid and boundary \end{DoxyCompactList}\item 
void \hyperlink{class_environment_a0d5cc7be186f0631c5566efcb0a6f187}{resolveCollision} (\hyperlink{class_particle}{Particle} \&io\_\-currentParticle, const ngl::Vector \_\-contactPoint, const ngl::Vector \_\-normal, const ngl::Real \_\-penetrationDepth, const ngl::Real \_\-restitutionCoefficient)
\begin{DoxyCompactList}\small\item\em perform the actual collision handling (calculation of new position and velocity) once collision is detected \end{DoxyCompactList}\item 
void \hyperlink{class_environment_a333832554a94d3593f4b6eea1706bcb4}{updatePeriodicBoundingBox} ()
\begin{DoxyCompactList}\small\item\em update the periodic wall position at each iteration \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{class_environment_af32284dfd212ba085e2f440b8d3e887b}{m\_\-obstacleEnabled}
\begin{DoxyCompactList}\small\item\em flag to determine if RBD interaction is enabled \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_environment_a5be7e841d07b7d5b6e2300b9c7ce5977}{m\_\-boundaryDimension}
\begin{DoxyCompactList}\small\item\em boundary dimension \end{DoxyCompactList}\item 
ngl::Vector \hyperlink{class_environment_a0cd3f00365165a6bb63295fe0c998b7b}{m\_\-boundaryPosition}
\begin{DoxyCompactList}\small\item\em boundary centre position \end{DoxyCompactList}\item 
ngl::BBox $\ast$ \hyperlink{class_environment_a07577ebc459b623a9c052d53053eae22}{m\_\-boundaryBBox}
\begin{DoxyCompactList}\small\item\em boundary bounding box object used for collision handling \end{DoxyCompactList}\item 
bool \hyperlink{class_environment_a93e2d3b73f88875a9e3ad783a9093966}{m\_\-boundaryBoundTop}
\begin{DoxyCompactList}\small\item\em flag to determine if the top face of the boundary is closed \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_a39f2ed7926432be08121985545a1dcee}{m\_\-boundaryRestitutionCoefficientForFluid}
\begin{DoxyCompactList}\small\item\em restitution coefficient for fluid interaction with boundary \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_a7a6faf1d8355d4b90302b8593eb0afca}{m\_\-boundaryRestitutionCoefficientForRBD}
\begin{DoxyCompactList}\small\item\em restitution coefficient for RBD interaction with boundary \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_a455f9bec84b6ab1cf4a16e656ef80767}{m\_\-obstacleRestitutionCoefficient}
\begin{DoxyCompactList}\small\item\em restitution coefficient for fluid interaction with RBD \end{DoxyCompactList}\item 
std::vector$<$ \hyperlink{class_particle}{Particle} $>$ \hyperlink{class_environment_ad8fd964bb76cf7d3621109a890cf5113}{m\_\-sphereObstacleList}
\begin{DoxyCompactList}\small\item\em list of sphere RBD \end{DoxyCompactList}\item 
std::vector$<$ \hyperlink{class_capsule}{Capsule} $>$ \hyperlink{class_environment_ae8f7d7f843b540a13fd3b0b9334235c9}{m\_\-capsuleObstacleList}
\begin{DoxyCompactList}\small\item\em list of capsule RBD \end{DoxyCompactList}\item 
int \hyperlink{class_environment_aad6f0b85e8548665495fd4d7b20e3b78}{m\_\-capsuleResolution}
\begin{DoxyCompactList}\small\item\em resolution of the capsule drawing (the number of spheres used to draw the capsule) \end{DoxyCompactList}\item 
bool \hyperlink{class_environment_a404ae3005acb08157e6f088ec75ad572}{m\_\-periodicWallEnabled}
\begin{DoxyCompactList}\small\item\em flag to determine whether the boundary periodic wall is enabled \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_a574f3d158100780338c7212fd38ddac2}{m\_\-periodicWallMaxAmplitude}
\begin{DoxyCompactList}\small\item\em maximum amplitude of the periodic wall \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_ae5dd1d7a4c45ea35f42d15278eb04ed4}{m\_\-periodicWallSpeed}
\begin{DoxyCompactList}\small\item\em angle speed factor of the periodic wall \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_af45c5aeb2abab400ed3d4bf4925d45fe}{m\_\-angleOfPeriodicWall}
\begin{DoxyCompactList}\small\item\em angle of the periodic wall sine function \end{DoxyCompactList}\item 
ngl::Real \hyperlink{class_environment_a476cdd11550b1ddd4e4ebdfd476f0935}{m\_\-periodicWallAngleIncrement}
\begin{DoxyCompactList}\small\item\em angle increment of the periodic wall sine function \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
stores all rigid bodies and boundary and manages interaction among rigid bodies, fluids and the boundary 

Definition at line 26 of file Environment.h.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_environment_a8b427c4448d8b7536666837521b9e83d}{
\index{Environment@{Environment}!Environment@{Environment}}
\index{Environment@{Environment}!Environment@{Environment}}
\subsubsection[{Environment}]{\setlength{\rightskip}{0pt plus 5cm}Environment::Environment (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_environment_a8b427c4448d8b7536666837521b9e83d}


ctor 



Definition at line 12 of file Environment.cpp.



References Configuration::initialiseEnvironment(), m\_\-angleOfPeriodicWall, m\_\-boundaryBBox, m\_\-boundaryBoundTop, m\_\-boundaryDimension, m\_\-boundaryPosition, m\_\-boundaryRestitutionCoefficientForFluid, m\_\-boundaryRestitutionCoefficientForRBD, m\_\-capsuleObstacleList, m\_\-capsuleResolution, m\_\-obstacleEnabled, m\_\-obstacleRestitutionCoefficient, m\_\-periodicWallAngleIncrement, m\_\-periodicWallEnabled, m\_\-periodicWallMaxAmplitude, m\_\-periodicWallSpeed, and m\_\-sphereObstacleList.


\begin{DoxyCode}
{
    //create params from config
    Configuration::initialiseEnvironment
                            (
                                m_obstacleEnabled,
                                m_boundaryPosition,
                                m_boundaryDimension,
                                m_boundaryRestitutionCoefficientForFluid,
                                m_boundaryRestitutionCoefficientForRBD,
                                m_boundaryBoundTop,
                                m_sphereObstacleList,
                                m_capsuleObstacleList,
                                m_obstacleRestitutionCoefficient,
                                m_periodicWallEnabled,
                                m_periodicWallMaxAmplitude,
                                m_periodicWallSpeed,
                                m_periodicWallAngleIncrement,
                                m_capsuleResolution
                            );

    //create bbox for boundary
    m_boundaryBBox = new ngl::BBox(m_boundaryPosition, m_boundaryDimension.m_x, 
      m_boundaryDimension.m_y, m_boundaryDimension.m_z);

    //init params
    m_angleOfPeriodicWall = 0.0;
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a8b427c4448d8b7536666837521b9e83d_cgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a8e294735187880dd3d59be10c425b29d}{
\index{Environment@{Environment}!$\sim$Environment@{$\sim$Environment}}
\index{$\sim$Environment@{$\sim$Environment}!Environment@{Environment}}
\subsubsection[{$\sim$Environment}]{\setlength{\rightskip}{0pt plus 5cm}Environment::$\sim$Environment (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_environment_a8e294735187880dd3d59be10c425b29d}


dtor 



Definition at line 40 of file Environment.cpp.



References m\_\-boundaryBBox.


\begin{DoxyCode}
{
    //clean up
    std::cout << "Environment Cleanup" << std::endl;

    delete m_boundaryBBox;
}
\end{DoxyCode}


\subsection{Member Function Documentation}
\hypertarget{class_environment_a6070450ab9185f1f1b2222c7e6c74372}{
\index{Environment@{Environment}!checkAndResolveCollision@{checkAndResolveCollision}}
\index{checkAndResolveCollision@{checkAndResolveCollision}!Environment@{Environment}}
\subsubsection[{checkAndResolveCollision}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::checkAndResolveCollision (
\begin{DoxyParamCaption}
\item[{{\bf Particle} \&}]{io\_\-currentParticle, }
\item[{bool \&}]{o\_\-hitBoundary, }
\item[{bool \&}]{o\_\-hitRBD, }
\item[{const bool}]{\_\-fromRBD}
\end{DoxyParamCaption}
)}}
\label{class_environment_a6070450ab9185f1f1b2222c7e6c74372}


detect and handles collision among particles (sphere rbd and fluid particle) 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em io\_\-currentParticle} & the particle affected by the collision resolution \\
\hline
\mbox{\tt out}  & {\em o\_\-hitBoundary} & returns whether the particle collided against the boundary \\
\hline
\mbox{\tt out}  & {\em o\_\-hitRBD} & returns whether the particle collided against a rigid body \\
\hline
\mbox{\tt in}  & {\em \_\-fromRBD} & set whether this method was called by a sphere rigid body or by a fluid particle \\
\hline
\end{DoxyParams}


Definition at line 179 of file Environment.cpp.



References Particle::getId().


\begin{DoxyCode}
{
    o_hitRBD = false;

    if (m_obstacleEnabled)
    {
        //sphere-sphere and fluid-sphere collision handling if enabled
        BOOST_FOREACH(Particle& obstacle, m_sphereObstacleList)
        {
            //prevent collision check of an obstacle against itself
            if (obstacle.getId() != io_currentParticle.getId())
            {
                //check collision against obstacle (sphere-sphere interaction)
                bool hit = checkAndResolveCollisionWithObstacle(io_currentParticl
      e, obstacle);
                o_hitRBD = hit ? true : o_hitRBD;
            }
        }

        //sphere-capsule and fluid-capsule collision handling if enabled
        BOOST_FOREACH(Capsule& obstacle, m_capsuleObstacleList)
        {
            //prevent collision check of an obstacle against itself
            if (obstacle.getId() != io_currentParticle.getId())
            {
                //check collision against obstacle (sphere-capsule interaction)
                bool hit = checkAndResolveCollisionWithObstacle(io_currentParticl
      e, obstacle);
                o_hitRBD = hit ? true : o_hitRBD;
            }
        }
    }

    //collision handling against the boundary
    o_hitBoundary = checkAndResolveCollisionWithBoundary(io_currentParticle, _fro
      mRBD);
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=384pt]{class_environment_a6070450ab9185f1f1b2222c7e6c74372_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a6070450ab9185f1f1b2222c7e6c74372_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a59081288b51d495f928c0af5006d5cd1}{
\index{Environment@{Environment}!checkAndResolveCollisionWithBoundary@{checkAndResolveCollisionWithBoundary}}
\index{checkAndResolveCollisionWithBoundary@{checkAndResolveCollisionWithBoundary}!Environment@{Environment}}
\subsubsection[{checkAndResolveCollisionWithBoundary}]{\setlength{\rightskip}{0pt plus 5cm}bool Environment::checkAndResolveCollisionWithBoundary (
\begin{DoxyParamCaption}
\item[{{\bf Particle} \&}]{io\_\-currentParticle, }
\item[{const bool}]{\_\-fromRBD}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a59081288b51d495f928c0af5006d5cd1}


handle collision between RBD/fluid and boundary 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em io\_\-currentParticle} & the particle affected by the collision resolution \\
\hline
\mbox{\tt in}  & {\em \_\-fromRBD} & flag to determine whether the affected particle is an RBD \\
\hline
\end{DoxyParams}


Definition at line 340 of file Environment.cpp.



References Particle::getPosition(), Particle::getRadius(), Particle::getVelocity(), Particle::updatePosition(), and Particle::updateVelocity().


\begin{DoxyCode}
{
    //determine bounds of box
    ngl::Real xMax = m_boundaryBBox->center().m_x + (m_boundaryBBox->width()/2.0f
      );
    ngl::Real xMin = m_boundaryBBox->center().m_x - (m_boundaryBBox->width()/2.0f
      );
    ngl::Real yMax = m_boundaryBBox->center().m_y + (m_boundaryBBox->height()/2.0
      f);
    ngl::Real yMin = m_boundaryBBox->center().m_y - (m_boundaryBBox->height()/2.0
      f);
    ngl::Real zMax = m_boundaryBBox->center().m_z + (m_boundaryBBox->depth()/2.0f
      );
    ngl::Real zMin = m_boundaryBBox->center().m_z - (m_boundaryBBox->depth()/2.0f
      );

    //move bounds closer due to difference in particle's radius
    xMax -= io_currentParticle.getRadius();
    xMin += io_currentParticle.getRadius();
    yMax -= io_currentParticle.getRadius();
    yMin += io_currentParticle.getRadius();
    zMax -= io_currentParticle.getRadius();
    zMin += io_currentParticle.getRadius();

    //assume no collision
    bool hasCollisionOccured = false;

    //get position of particle
    ngl::Vector currentPosition = io_currentParticle.getPosition();

    //evaluate restitution coefficient to be used based on origin
    ngl::Real restitutionCoefficient = _fromRBD ? 
      m_boundaryRestitutionCoefficientForRBD : 
      m_boundaryRestitutionCoefficientForFluid;

    //collision check for XMax breach
    if (currentPosition.m_x > xMax)
    {
        hasCollisionOccured = true;

        //set position to boundary edge
        io_currentParticle.updatePosition(ngl::Vector(xMax, io_currentParticle.
      getPosition().m_y, io_currentParticle.getPosition().m_z));

        //calculate new velocity (reflect on face normal with restitution factor
        io_currentParticle.updateVelocity(ngl::Vector(-restitutionCoefficient * i
      o_currentParticle.getVelocity().m_x, io_currentParticle.getVelocity().m_y, io_cur
      rentParticle.getVelocity().m_z));
    }

    //collision check for XMin breach
    if (currentPosition.m_x < xMin)
    {
        hasCollisionOccured = true;

        //set position to boundary edge
        io_currentParticle.updatePosition(ngl::Vector(xMin, io_currentParticle.
      getPosition().m_y, io_currentParticle.getPosition().m_z));

        //calculate new velocity (reflect on face normal with restitution factor
        io_currentParticle.updateVelocity(ngl::Vector(-restitutionCoefficient * i
      o_currentParticle.getVelocity().m_x, io_currentParticle.getVelocity().m_y, io_cur
      rentParticle.getVelocity().m_z));
    }

    //collision check for YMin breach
    if (currentPosition.m_y < yMin)
    {
        hasCollisionOccured = true;

        //set position to boundary edge
        io_currentParticle.updatePosition(ngl::Vector(io_currentParticle.
      getPosition().m_x, yMin, io_currentParticle.getPosition().m_z));

        //calculate new velocity (reflect on face normal with restitution factor
        io_currentParticle.updateVelocity(ngl::Vector(io_currentParticle.
      getVelocity().m_x, -restitutionCoefficient * io_currentParticle.getVelocity().m_y
      , io_currentParticle.getVelocity().m_z));
    }

    //collision check for YMax breach if top is bound
    if (m_boundaryBoundTop && (currentPosition.m_y > yMax))
    {
        hasCollisionOccured = true;

        //set position to boundary edge
        io_currentParticle.updatePosition(ngl::Vector(io_currentParticle.
      getPosition().m_x, yMax, io_currentParticle.getPosition().m_z));

        //calculate new velocity (reflect on face normal with restitution factor
        io_currentParticle.updateVelocity(ngl::Vector(io_currentParticle.
      getVelocity().m_x, -restitutionCoefficient * io_currentParticle.getVelocity().m_y
      , io_currentParticle.getVelocity().m_z));
    }

    //collision check for ZMin breach
    if (currentPosition.m_z < zMin)
    {
        hasCollisionOccured = true;

        //set position to boundary edge
        io_currentParticle.updatePosition(ngl::Vector(io_currentParticle.
      getPosition().m_x, io_currentParticle.getPosition().m_y, zMin));

        //calculate new velocity (reflect on face normal with restitution factor
        io_currentParticle.updateVelocity(ngl::Vector(io_currentParticle.
      getVelocity().m_x, io_currentParticle.getVelocity().m_y, -restitutionCoefficient 
      * io_currentParticle.getVelocity().m_z));
    }

    //collision check for ZMax breach
    if (currentPosition.m_z > zMax)
    {
        hasCollisionOccured = true;

        //set position to boundary edge
        io_currentParticle.updatePosition(ngl::Vector(io_currentParticle.
      getPosition().m_x, io_currentParticle.getPosition().m_y, zMax));

        //calculate new velocity (reflect on face normal with restitution factor
        io_currentParticle.updateVelocity(ngl::Vector(io_currentParticle.
      getVelocity().m_x, io_currentParticle.getVelocity().m_y, -restitutionCoefficient 
      * io_currentParticle.getVelocity().m_z));
    }

    return hasCollisionOccured;
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a59081288b51d495f928c0af5006d5cd1_cgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a65ca7a485ba9a0d29fb8bc2d4fb6df5d}{
\index{Environment@{Environment}!checkAndResolveCollisionWithObstacle@{checkAndResolveCollisionWithObstacle}}
\index{checkAndResolveCollisionWithObstacle@{checkAndResolveCollisionWithObstacle}!Environment@{Environment}}
\subsubsection[{checkAndResolveCollisionWithObstacle}]{\setlength{\rightskip}{0pt plus 5cm}bool Environment::checkAndResolveCollisionWithObstacle (
\begin{DoxyParamCaption}
\item[{{\bf Particle} \&}]{io\_\-currentParticle, }
\item[{{\bf Particle} \&}]{\_\-obstacle}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a65ca7a485ba9a0d29fb8bc2d4fb6df5d}


handle collision between sphere/fluid and sphere 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em io\_\-currentParticle} & the particle affected by the collision resolution \\
\hline
\mbox{\tt in}  & {\em \_\-obstacle} & the rigid body against which collision is checked \\
\hline
\end{DoxyParams}


Definition at line 220 of file Environment.cpp.



References Particle::getPosition(), and Particle::getRadius().


\begin{DoxyCode}
{
    //assume no collision
    bool hasCollisionOccured = false;

    //initialise variables
    ngl::Vector X = io_currentParticle.getPosition();
    ngl::Vector C = _obstacle.getPosition();
    ngl::Vector XC = X - C;
    ngl::Vector CX = C - X;

    ngl::Real r = io_currentParticle.getRadius() + _obstacle.getRadius();

    //calculate implicit function value for a sphere
    ngl::Real Fx = XC.lengthSquared() - (r * r);

    if (Fx < 0)
    {
        //collision occured
        hasCollisionOccured = true;

        //calculate contact point
        ngl::Vector CP = C + (r * (XC / XC.length()));

        //calculate penetration depth
        ngl::Real depth = fabs(CX.length() - r);

        //calculate normal
        ngl::Vector n = (Fx < 0 ? -1 : Fx == 0 ? 0 : 1) * (CX / CX.length());

        //calculate new position and velocity for particle
        resolveCollision(io_currentParticle, CP, n, depth, 
      m_obstacleRestitutionCoefficient);
    }

    return hasCollisionOccured;
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a65ca7a485ba9a0d29fb8bc2d4fb6df5d_cgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a700ce92d40c1ac77b38d7e3c7adea6f8}{
\index{Environment@{Environment}!checkAndResolveCollisionWithObstacle@{checkAndResolveCollisionWithObstacle}}
\index{checkAndResolveCollisionWithObstacle@{checkAndResolveCollisionWithObstacle}!Environment@{Environment}}
\subsubsection[{checkAndResolveCollisionWithObstacle}]{\setlength{\rightskip}{0pt plus 5cm}bool Environment::checkAndResolveCollisionWithObstacle (
\begin{DoxyParamCaption}
\item[{{\bf Particle} \&}]{io\_\-currentParticle, }
\item[{{\bf Capsule} \&}]{\_\-obstacle}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a700ce92d40c1ac77b38d7e3c7adea6f8}


handle collision between sphere/fluid and capsule 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em io\_\-currentParticle} & the particle affected by the collision resolution \\
\hline
\mbox{\tt in}  & {\em \_\-obstacle} & the rigid body against which collision is checked \\
\hline
\end{DoxyParams}


Definition at line 261 of file Environment.cpp.



References Capsule::getHeight(), Capsule::getPoint1(), Capsule::getPoint2(), Particle::getPosition(), and Particle::getRadius().


\begin{DoxyCode}
{
    //assume no collision
    bool hasCollisionOccured = false;

    //initialise variables
    ngl::Vector X = io_currentParticle.getPosition();
    ngl::Vector C = _obstacle.getPosition();
    ngl::Vector XC = X - C;

    ngl::Real r = io_currentParticle.getRadius() + (_obstacle.getRadius() + _obst
      acle.getHeight());

    //calculate implicit function value for the bounding sphere
    ngl::Real FxSphere = XC.lengthSquared() - (r * r);

    if (FxSphere < 0)
    {
        //collision occured with bounding sphere -> capsule collision handling mu
      st be done

        //initialise capsule parameters
        ngl::Vector P0 = _obstacle.getPoint1();
        ngl::Vector P1 = _obstacle.getPoint2();

        ngl::Vector P0X = P0 - X;
        ngl::Vector P1P0 = P1 - P0;

        ngl::Real a = std::min(1.0, std::max(0.0, -1.0 * (P0X.dot(P1P0) / P1P0.le
      ngthSquared())));
        ngl::Vector Q = P0 + (a * P1P0);

        r = io_currentParticle.getRadius() + _obstacle.getRadius();

        //calculate implicit function value for a capsule
        ngl::Real FxCapsule = (Q - X).length() - r;

        if (FxCapsule < 0)
        {
            //collision with capsule
            hasCollisionOccured = true;

            //calculate contact point
            ngl::Vector CP = Q + (r * ((X - Q) / (X - Q).length()));

            //calculate penetration depth
            ngl::Real depth = fabs(FxCapsule);

            //calculate normal
            ngl::Vector n = (FxCapsule < 0 ? -1 : FxCapsule == 0 ? 0 : 1) * ((Q -
       X) / (Q - X).length());

            //calculate new position and velocity for particle
            resolveCollision(io_currentParticle, CP, n, depth, 
      m_obstacleRestitutionCoefficient);
        }
    }

    return hasCollisionOccured;
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a700ce92d40c1ac77b38d7e3c7adea6f8_cgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a002c03ff1013fe6396c4925c058da518}{
\index{Environment@{Environment}!draw@{draw}}
\index{draw@{draw}!Environment@{Environment}}
\subsubsection[{draw}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::draw (
\begin{DoxyParamCaption}
\item[{ngl::TransformStack}]{\_\-txStack, }
\item[{{\bf ShaderLibrary} $\ast$}]{io\_\-sman, }
\item[{const std::string}]{\_\-boundaryShader, }
\item[{const std::string}]{\_\-obstacleShader}
\end{DoxyParamCaption}
)}}
\label{class_environment_a002c03ff1013fe6396c4925c058da518}


draws the obstacles 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-txStack} & the transform stack, used for pushing and popping opengl states \\
\hline
\mbox{\tt in,out}  & {\em io\_\-sman} & the shader library, used for shading/rendering of the objects \\
\hline
\mbox{\tt in}  & {\em \_\-boundaryShader} & the shader used for boundary drawing \\
\hline
\mbox{\tt in}  & {\em \_\-obstacleShader} & the shader used for obstacle drawing \\
\hline
\end{DoxyParams}


Definition at line 57 of file Environment.cpp.



References Particle::getColour(), Capsule::getHeight(), Capsule::getOrientationVector(), Capsule::getPoint1(), Capsule::getPoint2(), Particle::getPosition(), Particle::getRadius(), Configuration::s\_\-boundaryColour, ShaderLibrary::updateColor(), and ShaderLibrary::updateModel().


\begin{DoxyCode}
{
    //draw boundary
    _txStack.pushTransform();
    {
        //pass vertex info to shader
        io_sman->updateModel(_boundaryShader, _txStack.getCurrAndGlobal().getMatr
      ix(), false);

        //pass color info to shader
        io_sman->updateColor(_boundaryShader, Configuration::s_boundaryColour, fa
      lse);

        m_boundaryBBox->draw();
    }
    _txStack.popTransform();

    //draw obstacles if enabled
    if (m_obstacleEnabled)
    {
        ngl::VBOPrimitives* prim = ngl::VBOPrimitives::instance();

        //draw sphere
        _txStack.pushTransform();
        {
            BOOST_FOREACH(Particle& obstacle, m_sphereObstacleList)
            {
                _txStack.getCurrentTransform().setPosition(obstacle.getPosition()
      .m_x, obstacle.getPosition().m_y, obstacle.getPosition().m_z);
                _txStack.getCurrentTransform().setScale(obstacle.getRadius(), obs
      tacle.getRadius(), obstacle.getRadius());

                //pass vertex info to shader
                io_sman->updateModel(_obstacleShader, _txStack.getCurrAndGlobal()
      .getMatrix(), false);

                //pass color info to shader (dont update gradient)
                io_sman->updateColor(_obstacleShader, obstacle.getColour(), false
      );

                prim->draw("obstacleSphere");
            }
        }
        _txStack.popTransform();

        //draw capsule
        _txStack.pushTransform();
        {
            BOOST_FOREACH(Capsule& obstacle, m_capsuleObstacleList)
            {
                _txStack.getCurrentTransform().setScale(obstacle.getRadius(), obs
      tacle.getRadius(), obstacle.getRadius());

                //pass color info to shader (dont update gradient)
                io_sman->updateColor(_obstacleShader, obstacle.getColour(), false
      );

                float step = (obstacle.getHeight() * 2.0) / m_capsuleResolution;
                for (float i = 0; i < obstacle.getHeight() * 2; i += step)
                {
                    ngl::Vector position = obstacle.getPoint1() + (i * obstacle.
      getOrientationVector());

                    //draw sphere
                    _txStack.getCurrentTransform().setPosition(position);

                    //pass vertex info to shader
                    io_sman->updateModel(_obstacleShader, _txStack.getCurrAndGlob
      al().getMatrix(), false);

                    prim->draw("obstacleSphere");
                }

                //draw sphere
                _txStack.getCurrentTransform().setPosition(obstacle.getPoint2());
      

                //pass vertex info to shader
                io_sman->updateModel(_obstacleShader, _txStack.getCurrAndGlobal()
      .getMatrix(), false);

                prim->draw("obstacleSphere");
            }
        }
        _txStack.popTransform();
    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=360pt]{class_environment_a002c03ff1013fe6396c4925c058da518_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=314pt]{class_environment_a002c03ff1013fe6396c4925c058da518_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a6144d18fd74e20a4ac04c28fbbf03fc4}{
\index{Environment@{Environment}!getAngleOfPeriodicWall@{getAngleOfPeriodicWall}}
\index{getAngleOfPeriodicWall@{getAngleOfPeriodicWall}!Environment@{Environment}}
\subsubsection[{getAngleOfPeriodicWall}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real Environment::getAngleOfPeriodicWall (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a6144d18fd74e20a4ac04c28fbbf03fc4}


return the angle of the periodic wall sine function 



Definition at line 126 of file Environment.h.



References m\_\-angleOfPeriodicWall.


\begin{DoxyCode}
{ return m_angleOfPeriodicWall; }
\end{DoxyCode}
\hypertarget{class_environment_a8d7d0cccc1270a8c69551df6b0e65773}{
\index{Environment@{Environment}!getBoundaryBoundTop@{getBoundaryBoundTop}}
\index{getBoundaryBoundTop@{getBoundaryBoundTop}!Environment@{Environment}}
\subsubsection[{getBoundaryBoundTop}]{\setlength{\rightskip}{0pt plus 5cm}bool Environment::getBoundaryBoundTop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a8d7d0cccc1270a8c69551df6b0e65773}


return whether the top face of the boundary is closed 



Definition at line 102 of file Environment.h.



References m\_\-boundaryBoundTop.


\begin{DoxyCode}
{ return m_boundaryBoundTop; }
\end{DoxyCode}
\hypertarget{class_environment_abb9767250c06bb5a1aa2e8fab34515f9}{
\index{Environment@{Environment}!getBoundaryDimension@{getBoundaryDimension}}
\index{getBoundaryDimension@{getBoundaryDimension}!Environment@{Environment}}
\subsubsection[{getBoundaryDimension}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Environment::getBoundaryDimension (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_abb9767250c06bb5a1aa2e8fab34515f9}


return the boundary dimension 



Definition at line 96 of file Environment.h.



References m\_\-boundaryDimension.


\begin{DoxyCode}
{ return m_boundaryDimension; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_abb9767250c06bb5a1aa2e8fab34515f9_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a39d043e06b306ae7c895c1c2bd22a576}{
\index{Environment@{Environment}!getBoundaryNameList@{getBoundaryNameList}}
\index{getBoundaryNameList@{getBoundaryNameList}!Environment@{Environment}}
\subsubsection[{getBoundaryNameList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$ std::string $>$ Environment::getBoundaryNameList (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_environment_a39d043e06b306ae7c895c1c2bd22a576}


return a list of the boundary box name, used for caching 



Definition at line 498 of file Environment.cpp.


\begin{DoxyCode}
{
    std::vector<std::string> list;
    list.push_back("box");

    return list;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a39d043e06b306ae7c895c1c2bd22a576_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a7ae9db6fe796a2509260ceda13996aec}{
\index{Environment@{Environment}!getBoundaryPosition@{getBoundaryPosition}}
\index{getBoundaryPosition@{getBoundaryPosition}!Environment@{Environment}}
\subsubsection[{getBoundaryPosition}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector Environment::getBoundaryPosition (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a7ae9db6fe796a2509260ceda13996aec}


return the boundary centre position 



Definition at line 99 of file Environment.h.



References m\_\-boundaryPosition.


\begin{DoxyCode}
{ return m_boundaryPosition; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a7ae9db6fe796a2509260ceda13996aec_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_acea02d31352a606c89b09246ab27f642}{
\index{Environment@{Environment}!getBoundaryPositionList@{getBoundaryPositionList}}
\index{getBoundaryPositionList@{getBoundaryPositionList}!Environment@{Environment}}
\subsubsection[{getBoundaryPositionList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$ std::vector$<$ ngl::Vector $>$ $>$ Environment::getBoundaryPositionList (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_environment_acea02d31352a606c89b09246ab27f642}


return a 2d list of the faces of the boundary, used for caching 



Definition at line 468 of file Environment.cpp.



References m\_\-boundaryBBox.


\begin{DoxyCode}
{
    std::vector<std::vector<ngl::Vector> > positionList;

    std::vector<ngl::Vector> list;
    list.reserve(8);

    //determine bounds of box
    ngl::Real xMax = m_boundaryBBox->center().m_x + (m_boundaryBBox->width()/2.0f
      );
    ngl::Real xMin = m_boundaryBBox->center().m_x - (m_boundaryBBox->width()/2.0f
      );
    ngl::Real yMax = m_boundaryBBox->center().m_y + (m_boundaryBBox->height()/2.0
      f);
    ngl::Real yMin = m_boundaryBBox->center().m_y - (m_boundaryBBox->height()/2.0
      f);
    ngl::Real zMax = m_boundaryBBox->center().m_z + (m_boundaryBBox->depth()/2.0f
      );
    ngl::Real zMin = m_boundaryBBox->center().m_z - (m_boundaryBBox->depth()/2.0f
      );

    //add vertices anticlockwise direction (2 faces : lower, then uppper)
    list.push_back(ngl::Vector(xMin, yMin, zMin));
    list.push_back(ngl::Vector(xMax, yMin, zMin));
    list.push_back(ngl::Vector(xMax, yMin, zMax));
    list.push_back(ngl::Vector(xMin, yMin, zMax));
    list.push_back(ngl::Vector(xMin, yMax, zMin));
    list.push_back(ngl::Vector(xMax, yMax, zMin));
    list.push_back(ngl::Vector(xMax, yMax, zMax));
    list.push_back(ngl::Vector(xMin, yMax, zMax));

    positionList.push_back(list);

    return positionList;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_acea02d31352a606c89b09246ab27f642_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_ad3590ccbb3275498fa2c4d4a860da22e}{
\index{Environment@{Environment}!getBoundaryRestitutionCoefficientForFluid@{getBoundaryRestitutionCoefficientForFluid}}
\index{getBoundaryRestitutionCoefficientForFluid@{getBoundaryRestitutionCoefficientForFluid}!Environment@{Environment}}
\subsubsection[{getBoundaryRestitutionCoefficientForFluid}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real Environment::getBoundaryRestitutionCoefficientForFluid (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_ad3590ccbb3275498fa2c4d4a860da22e}


return the restitution coefficient for fluid interaction with boundary 



Definition at line 105 of file Environment.h.



References m\_\-boundaryRestitutionCoefficientForFluid.


\begin{DoxyCode}
{ return m_boundaryRestitutionCoefficientForFluid; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_ad3590ccbb3275498fa2c4d4a860da22e_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_ac72e674dc2013635718e9ff1492eae25}{
\index{Environment@{Environment}!getBoundaryRestitutionCoefficientForRBD@{getBoundaryRestitutionCoefficientForRBD}}
\index{getBoundaryRestitutionCoefficientForRBD@{getBoundaryRestitutionCoefficientForRBD}!Environment@{Environment}}
\subsubsection[{getBoundaryRestitutionCoefficientForRBD}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real Environment::getBoundaryRestitutionCoefficientForRBD (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_ac72e674dc2013635718e9ff1492eae25}


return the restitution coefficient for RBD interaction with boundary 



Definition at line 108 of file Environment.h.



References m\_\-boundaryRestitutionCoefficientForRBD.


\begin{DoxyCode}
{ return m_boundaryRestitutionCoefficientForRBD; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_ac72e674dc2013635718e9ff1492eae25_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a9636b19f77061b91c97171dbe810ec95}{
\index{Environment@{Environment}!getCapsuleNameList@{getCapsuleNameList}}
\index{getCapsuleNameList@{getCapsuleNameList}!Environment@{Environment}}
\subsubsection[{getCapsuleNameList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$ std::string $>$ Environment::getCapsuleNameList (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_environment_a9636b19f77061b91c97171dbe810ec95}


return a list of the capsules id, used for caching 



Definition at line 569 of file Environment.cpp.



References m\_\-capsuleObstacleList.


\begin{DoxyCode}
{
    std::vector<std::string> list;

    //loop through capsule list
    for (int i = 0; i < m_capsuleObstacleList.size(); ++i)
    {
        list.push_back(boost::lexical_cast<std::string>(i));
    }

    return list;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a9636b19f77061b91c97171dbe810ec95_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_accdbc629b803fb3e63c655541eb21a77}{
\index{Environment@{Environment}!getCapsuleObstacleList@{getCapsuleObstacleList}}
\index{getCapsuleObstacleList@{getCapsuleObstacleList}!Environment@{Environment}}
\subsubsection[{getCapsuleObstacleList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf Capsule}$>$\& Environment::getCapsuleObstacleList (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_accdbc629b803fb3e63c655541eb21a77}


return the list of capsule RBD 



Definition at line 89 of file Environment.h.



References m\_\-capsuleObstacleList.


\begin{DoxyCode}
{ return m_capsuleObstacleList; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_accdbc629b803fb3e63c655541eb21a77_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a265b5d911d51ff7cfb5e1eb533862c20}{
\index{Environment@{Environment}!getCapsulePositionList@{getCapsulePositionList}}
\index{getCapsulePositionList@{getCapsulePositionList}!Environment@{Environment}}
\subsubsection[{getCapsulePositionList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$ std::vector$<$ ngl::Vector $>$ $>$ Environment::getCapsulePositionList (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_environment_a265b5d911d51ff7cfb5e1eb533862c20}


return a 2d list of the position of capsules, used for caching 



Definition at line 541 of file Environment.cpp.



References m\_\-capsuleObstacleList, and m\_\-capsuleResolution.


\begin{DoxyCode}
{
    std::vector<std::vector<ngl::Vector> > positionList;

    //loop through capsule list
    for (int i = 0; i < m_capsuleObstacleList.size(); ++i)
    {
        std::vector<ngl::Vector> list;

        float step = (m_capsuleObstacleList[i].getHeight() * 2.0) / 
      m_capsuleResolution;
        for (float j = 0; j < m_capsuleObstacleList[i].getHeight() * 2; j += step
      )
        {
            //calculate position of intermediate sphere
            ngl::Vector position = m_capsuleObstacleList[i].getPoint1() + (j * 
      m_capsuleObstacleList[i].getOrientationVector());

            //add position to small list
            list.push_back(position);
        }

        list.push_back(m_capsuleObstacleList[i].getPoint2());

        //add to big list
        positionList.push_back(list);
    }

    return positionList;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a265b5d911d51ff7cfb5e1eb533862c20_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a69da13f2e7dd360703c7627b7e8a2387}{
\index{Environment@{Environment}!getCapsuleResolution@{getCapsuleResolution}}
\index{getCapsuleResolution@{getCapsuleResolution}!Environment@{Environment}}
\subsubsection[{getCapsuleResolution}]{\setlength{\rightskip}{0pt plus 5cm}int Environment::getCapsuleResolution (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a69da13f2e7dd360703c7627b7e8a2387}


return the resolution of the capsule drawing 



Definition at line 114 of file Environment.h.



References m\_\-capsuleResolution.


\begin{DoxyCode}
{ return m_capsuleResolution; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a69da13f2e7dd360703c7627b7e8a2387_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a3083a32a2114551dc8ca4339a0579346}{
\index{Environment@{Environment}!getObstacleEnabled@{getObstacleEnabled}}
\index{getObstacleEnabled@{getObstacleEnabled}!Environment@{Environment}}
\subsubsection[{getObstacleEnabled}]{\setlength{\rightskip}{0pt plus 5cm}bool Environment::getObstacleEnabled (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a3083a32a2114551dc8ca4339a0579346}


return whether RBD interaction is enabled 



Definition at line 93 of file Environment.h.



References m\_\-obstacleEnabled.


\begin{DoxyCode}
{ return m_obstacleEnabled; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a3083a32a2114551dc8ca4339a0579346_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_ab43f66a68b14a626af52ba842b83081b}{
\index{Environment@{Environment}!getObstacleRestitutionCoefficient@{getObstacleRestitutionCoefficient}}
\index{getObstacleRestitutionCoefficient@{getObstacleRestitutionCoefficient}!Environment@{Environment}}
\subsubsection[{getObstacleRestitutionCoefficient}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real Environment::getObstacleRestitutionCoefficient (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_ab43f66a68b14a626af52ba842b83081b}


return the restitution coefficient for fluid interaction with RBD 



Definition at line 111 of file Environment.h.



References m\_\-obstacleRestitutionCoefficient.


\begin{DoxyCode}
{ return m_obstacleRestitutionCoefficient; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_ab43f66a68b14a626af52ba842b83081b_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a691c933b425166768c8404392270e633}{
\index{Environment@{Environment}!getPeriodicWallAngleIncrement@{getPeriodicWallAngleIncrement}}
\index{getPeriodicWallAngleIncrement@{getPeriodicWallAngleIncrement}!Environment@{Environment}}
\subsubsection[{getPeriodicWallAngleIncrement}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real Environment::getPeriodicWallAngleIncrement (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a691c933b425166768c8404392270e633}


return the angle increment of the periodic wall sine function 



Definition at line 129 of file Environment.h.



References m\_\-periodicWallAngleIncrement.


\begin{DoxyCode}
{ return m_periodicWallAngleIncrement; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a691c933b425166768c8404392270e633_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a2aa2828b3f6727b3d886e62e5abd889f}{
\index{Environment@{Environment}!getPeriodicWallEnabled@{getPeriodicWallEnabled}}
\index{getPeriodicWallEnabled@{getPeriodicWallEnabled}!Environment@{Environment}}
\subsubsection[{getPeriodicWallEnabled}]{\setlength{\rightskip}{0pt plus 5cm}bool Environment::getPeriodicWallEnabled (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a2aa2828b3f6727b3d886e62e5abd889f}


return whether the boundary periodic wall is enabled 



Definition at line 117 of file Environment.h.



References m\_\-periodicWallEnabled.


\begin{DoxyCode}
{ return m_periodicWallEnabled; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a2aa2828b3f6727b3d886e62e5abd889f_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a0ca9bcd0229e30c9f646b5b27268d00b}{
\index{Environment@{Environment}!getPeriodicWallMaxAmplitude@{getPeriodicWallMaxAmplitude}}
\index{getPeriodicWallMaxAmplitude@{getPeriodicWallMaxAmplitude}!Environment@{Environment}}
\subsubsection[{getPeriodicWallMaxAmplitude}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real Environment::getPeriodicWallMaxAmplitude (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a0ca9bcd0229e30c9f646b5b27268d00b}


return the maximum amplitude of the periodic wall 



Definition at line 120 of file Environment.h.



References m\_\-periodicWallMaxAmplitude.


\begin{DoxyCode}
{ return m_periodicWallMaxAmplitude; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a0ca9bcd0229e30c9f646b5b27268d00b_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a2e05358a7666933e38db204f958a3c56}{
\index{Environment@{Environment}!getPeriodicWallSpeed@{getPeriodicWallSpeed}}
\index{getPeriodicWallSpeed@{getPeriodicWallSpeed}!Environment@{Environment}}
\subsubsection[{getPeriodicWallSpeed}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real Environment::getPeriodicWallSpeed (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a2e05358a7666933e38db204f958a3c56}


return the angle speed factor of the periodic wall 



Definition at line 123 of file Environment.h.



References m\_\-periodicWallSpeed.


\begin{DoxyCode}
{ return m_periodicWallSpeed; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a2e05358a7666933e38db204f958a3c56_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_aacade06bda2dd048c5cd5783952d9ac0}{
\index{Environment@{Environment}!getSphereNameList@{getSphereNameList}}
\index{getSphereNameList@{getSphereNameList}!Environment@{Environment}}
\subsubsection[{getSphereNameList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$ std::string $>$ Environment::getSphereNameList (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_environment_aacade06bda2dd048c5cd5783952d9ac0}


return a list of the spheres id, used for caching 



Definition at line 528 of file Environment.cpp.



References m\_\-sphereObstacleList.


\begin{DoxyCode}
{
    std::vector<std::string> list;

    //loop through sphere list
    for (int i = 0; i < m_sphereObstacleList.size(); ++i)
    {
        list.push_back(boost::lexical_cast<std::string>(i));
    }

    return list;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_aacade06bda2dd048c5cd5783952d9ac0_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a551bdddbcebca8a712bc6604919afa1d}{
\index{Environment@{Environment}!getSphereObstacleList@{getSphereObstacleList}}
\index{getSphereObstacleList@{getSphereObstacleList}!Environment@{Environment}}
\subsubsection[{getSphereObstacleList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf Particle}$>$\& Environment::getSphereObstacleList (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a551bdddbcebca8a712bc6604919afa1d}


return the list of sphere RBD 



Definition at line 86 of file Environment.h.



References m\_\-sphereObstacleList.


\begin{DoxyCode}
{ return m_sphereObstacleList; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a551bdddbcebca8a712bc6604919afa1d_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a2a2c56970fa7f1fa407f3a9345b666f9}{
\index{Environment@{Environment}!getSpherePositionList@{getSpherePositionList}}
\index{getSpherePositionList@{getSpherePositionList}!Environment@{Environment}}
\subsubsection[{getSpherePositionList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<$ std::vector$<$ ngl::Vector $>$ $>$ Environment::getSpherePositionList (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_environment_a2a2c56970fa7f1fa407f3a9345b666f9}


return a 2d list of the position of spheres, used for caching 



Definition at line 506 of file Environment.cpp.



References m\_\-sphereObstacleList.


\begin{DoxyCode}
{
    std::vector<std::vector<ngl::Vector> > positionList;

    std::vector<ngl::Vector> list;
    list.reserve(m_sphereObstacleList.size());

    //loop through sphere list
    for (int i = 0; i < m_sphereObstacleList.size(); ++i)
    {
        std::vector<ngl::Vector> list;

        //add sphere position to list
        list.push_back(m_sphereObstacleList[i].getPosition());

        //add small list to big position list
        positionList.push_back(list);
    }

    return positionList;
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a2a2c56970fa7f1fa407f3a9345b666f9_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a818f6926a415a4f19bdcada4f90a10b5}{
\index{Environment@{Environment}!loadGeometry@{loadGeometry}}
\index{loadGeometry@{loadGeometry}!Environment@{Environment}}
\subsubsection[{loadGeometry}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::loadGeometry (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_environment_a818f6926a415a4f19bdcada4f90a10b5}


load vbo geometry 



Definition at line 48 of file Environment.cpp.


\begin{DoxyCode}
{
    ngl::VBOPrimitives *prim=ngl::VBOPrimitives::instance();

    prim->createVBOSphere("obstacleSphere", 1, 16);
    prim->createVBOCylinder("obstacleCylinder", 1, 1, 15, 20);
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=370pt]{class_environment_a818f6926a415a4f19bdcada4f90a10b5_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a0d5cc7be186f0631c5566efcb0a6f187}{
\index{Environment@{Environment}!resolveCollision@{resolveCollision}}
\index{resolveCollision@{resolveCollision}!Environment@{Environment}}
\subsubsection[{resolveCollision}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::resolveCollision (
\begin{DoxyParamCaption}
\item[{{\bf Particle} \&}]{io\_\-currentParticle, }
\item[{const ngl::Vector}]{\_\-contactPoint, }
\item[{const ngl::Vector}]{\_\-normal, }
\item[{const ngl::Real}]{\_\-penetrationDepth, }
\item[{const ngl::Real}]{\_\-restitutionCoefficient}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a0d5cc7be186f0631c5566efcb0a6f187}


perform the actual collision handling (calculation of new position and velocity) once collision is detected 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in,out}  & {\em io\_\-currentParticle} & the particle affected by the collision resolution \\
\hline
\mbox{\tt in}  & {\em \_\-contactPoint} & the contact point of collision \\
\hline
\mbox{\tt in}  & {\em \_\-normal} & the unit surface normal at the point of collision \\
\hline
\mbox{\tt in}  & {\em \_\-penetrationDepth} & the penetration depth of collision \\
\hline
\mbox{\tt in}  & {\em \_\-restitutionCoefficient} & the restitution coefficient used to calculate the new velocity \\
\hline
\end{DoxyParams}


Definition at line 321 of file Environment.cpp.



References Particle::getVelocity(), Particle::updatePosition(), and Particle::updateVelocity().


\begin{DoxyCode}
{
    //new position r = contact point
    io_currentParticle.updatePosition(_contactPoint);

    //calculate new velocity
    //u = u - (1 + Cr)(u.n)n
    ngl::Real dot = _normal.dot(io_currentParticle.getVelocity());
    ngl::Vector vel = io_currentParticle.getVelocity() - ((1.0 + _restitutionCoef
      ficient) * dot * _normal);
    io_currentParticle.updateVelocity(vel);
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=380pt]{class_environment_a0d5cc7be186f0631c5566efcb0a6f187_cgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a7e4c336d1397445e21668698cb0eb564}{
\index{Environment@{Environment}!setAngleOfPeriodicWall@{setAngleOfPeriodicWall}}
\index{setAngleOfPeriodicWall@{setAngleOfPeriodicWall}!Environment@{Environment}}
\subsubsection[{setAngleOfPeriodicWall}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::setAngleOfPeriodicWall (
\begin{DoxyParamCaption}
\item[{const ngl::Real}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a7e4c336d1397445e21668698cb0eb564}


set the angle of the periodic wall sine function 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new value \\
\hline
\end{DoxyParams}


Definition at line 184 of file Environment.h.



References m\_\-angleOfPeriodicWall.


\begin{DoxyCode}
{ m_angleOfPeriodicWall = _v; }
\end{DoxyCode}
\hypertarget{class_environment_acce32142fb09debaa2dbedb0d53f64db}{
\index{Environment@{Environment}!setBoundaryBoundTop@{setBoundaryBoundTop}}
\index{setBoundaryBoundTop@{setBoundaryBoundTop}!Environment@{Environment}}
\subsubsection[{setBoundaryBoundTop}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::setBoundaryBoundTop (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_acce32142fb09debaa2dbedb0d53f64db}


set whether the top face of the boundary is closed 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new flag \\
\hline
\end{DoxyParams}


Definition at line 152 of file Environment.h.



References m\_\-boundaryBoundTop.


\begin{DoxyCode}
{ m_boundaryBoundTop = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_acce32142fb09debaa2dbedb0d53f64db_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_afb15c570b1bd774906f2e242b686bb17}{
\index{Environment@{Environment}!setBoundaryDimension@{setBoundaryDimension}}
\index{setBoundaryDimension@{setBoundaryDimension}!Environment@{Environment}}
\subsubsection[{setBoundaryDimension}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::setBoundaryDimension (
\begin{DoxyParamCaption}
\item[{const ngl::Vector}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_afb15c570b1bd774906f2e242b686bb17}


set the boundary dimension 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new value \\
\hline
\end{DoxyParams}


Definition at line 139 of file Environment.h.



References m\_\-boundaryBBox, m\_\-boundaryDimension, and m\_\-boundaryPosition.


\begin{DoxyCode}
    {
        m_boundaryDimension = _v;
        delete m_boundaryBBox;
        m_boundaryBBox = new ngl::BBox(m_boundaryPosition, m_boundaryDimension.m_
      x, m_boundaryDimension.m_y, m_boundaryDimension.m_z);
    }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_afb15c570b1bd774906f2e242b686bb17_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a8b753fc5f5800addf2384bd3f23156d3}{
\index{Environment@{Environment}!setBoundaryPosition@{setBoundaryPosition}}
\index{setBoundaryPosition@{setBoundaryPosition}!Environment@{Environment}}
\subsubsection[{setBoundaryPosition}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::setBoundaryPosition (
\begin{DoxyParamCaption}
\item[{ngl::Vector}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a8b753fc5f5800addf2384bd3f23156d3}


set the boundary centre position 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new value \\
\hline
\end{DoxyParams}


Definition at line 148 of file Environment.h.



References m\_\-boundaryBBox, and m\_\-boundaryPosition.


\begin{DoxyCode}
{ m_boundaryPosition = _v; m_boundaryBBox->setCenter(_v); }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a8b753fc5f5800addf2384bd3f23156d3_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a59e4a62fd0f62e7a6c1eeddda80e029f}{
\index{Environment@{Environment}!setBoundaryRestitutionCoefficientForFluid@{setBoundaryRestitutionCoefficientForFluid}}
\index{setBoundaryRestitutionCoefficientForFluid@{setBoundaryRestitutionCoefficientForFluid}!Environment@{Environment}}
\subsubsection[{setBoundaryRestitutionCoefficientForFluid}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::setBoundaryRestitutionCoefficientForFluid (
\begin{DoxyParamCaption}
\item[{const ngl::Real}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a59e4a62fd0f62e7a6c1eeddda80e029f}


set the restitution coefficient for fluid interaction with boundary 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new value \\
\hline
\end{DoxyParams}


Definition at line 156 of file Environment.h.



References m\_\-boundaryRestitutionCoefficientForFluid.


\begin{DoxyCode}
{ m_boundaryRestitutionCoefficientForFluid = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a59e4a62fd0f62e7a6c1eeddda80e029f_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_aa5fb061ccd34a233ee1f47169188afbf}{
\index{Environment@{Environment}!setBoundaryRestitutionCoefficientForRBD@{setBoundaryRestitutionCoefficientForRBD}}
\index{setBoundaryRestitutionCoefficientForRBD@{setBoundaryRestitutionCoefficientForRBD}!Environment@{Environment}}
\subsubsection[{setBoundaryRestitutionCoefficientForRBD}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::setBoundaryRestitutionCoefficientForRBD (
\begin{DoxyParamCaption}
\item[{const ngl::Real}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_aa5fb061ccd34a233ee1f47169188afbf}


set the restitution coefficient for RBD interaction with boundary 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new value \\
\hline
\end{DoxyParams}


Definition at line 160 of file Environment.h.



References m\_\-boundaryRestitutionCoefficientForRBD.


\begin{DoxyCode}
{ m_boundaryRestitutionCoefficientForRBD = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_aa5fb061ccd34a233ee1f47169188afbf_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a426c72c57fea101de951aca60c15b04b}{
\index{Environment@{Environment}!setCapsuleResolution@{setCapsuleResolution}}
\index{setCapsuleResolution@{setCapsuleResolution}!Environment@{Environment}}
\subsubsection[{setCapsuleResolution}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::setCapsuleResolution (
\begin{DoxyParamCaption}
\item[{const int}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a426c72c57fea101de951aca60c15b04b}


set the resolution of the capsule drawing 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new value \\
\hline
\end{DoxyParams}


Definition at line 168 of file Environment.h.



References m\_\-capsuleResolution.


\begin{DoxyCode}
{ m_capsuleResolution = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a426c72c57fea101de951aca60c15b04b_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_ad171f12be377bce1244f447da5612f96}{
\index{Environment@{Environment}!setObstacleEnabled@{setObstacleEnabled}}
\index{setObstacleEnabled@{setObstacleEnabled}!Environment@{Environment}}
\subsubsection[{setObstacleEnabled}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::setObstacleEnabled (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_ad171f12be377bce1244f447da5612f96}


set whether RBD interaction is enabled 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new flag \\
\hline
\end{DoxyParams}


Definition at line 135 of file Environment.h.



References m\_\-obstacleEnabled.


\begin{DoxyCode}
{ m_obstacleEnabled = _v; }
\end{DoxyCode}
\hypertarget{class_environment_a9cd6f415dee9bb7606238db9fb6bed2b}{
\index{Environment@{Environment}!setObstacleRestitutionCoefficient@{setObstacleRestitutionCoefficient}}
\index{setObstacleRestitutionCoefficient@{setObstacleRestitutionCoefficient}!Environment@{Environment}}
\subsubsection[{setObstacleRestitutionCoefficient}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::setObstacleRestitutionCoefficient (
\begin{DoxyParamCaption}
\item[{const ngl::Real}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a9cd6f415dee9bb7606238db9fb6bed2b}


set the restitution coefficient for fluid interaction with RBD 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new value \\
\hline
\end{DoxyParams}


Definition at line 164 of file Environment.h.



References m\_\-obstacleRestitutionCoefficient.


\begin{DoxyCode}
{ m_obstacleRestitutionCoefficient = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a9cd6f415dee9bb7606238db9fb6bed2b_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_aed68eac202ef430d581cac865fa83da2}{
\index{Environment@{Environment}!setPeriodicWallAngleIncrement@{setPeriodicWallAngleIncrement}}
\index{setPeriodicWallAngleIncrement@{setPeriodicWallAngleIncrement}!Environment@{Environment}}
\subsubsection[{setPeriodicWallAngleIncrement}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::setPeriodicWallAngleIncrement (
\begin{DoxyParamCaption}
\item[{const ngl::Real}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_aed68eac202ef430d581cac865fa83da2}


set the angle increment of the periodic wall sine function 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new value \\
\hline
\end{DoxyParams}


Definition at line 188 of file Environment.h.



References m\_\-periodicWallAngleIncrement.


\begin{DoxyCode}
{ m_periodicWallAngleIncrement = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_aed68eac202ef430d581cac865fa83da2_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_aac100a2da9cf9f23a9907c27e3570f9b}{
\index{Environment@{Environment}!setPeriodicWallEnabled@{setPeriodicWallEnabled}}
\index{setPeriodicWallEnabled@{setPeriodicWallEnabled}!Environment@{Environment}}
\subsubsection[{setPeriodicWallEnabled}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::setPeriodicWallEnabled (
\begin{DoxyParamCaption}
\item[{const bool}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_aac100a2da9cf9f23a9907c27e3570f9b}


set whether the boundary periodic wall is enabled 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new flag \\
\hline
\end{DoxyParams}


Definition at line 172 of file Environment.h.



References m\_\-periodicWallEnabled.


\begin{DoxyCode}
{ m_periodicWallEnabled = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_aac100a2da9cf9f23a9907c27e3570f9b_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a505b45d602f5d65a88c8e3a421701ab3}{
\index{Environment@{Environment}!setPeriodicWallMaxAmplitude@{setPeriodicWallMaxAmplitude}}
\index{setPeriodicWallMaxAmplitude@{setPeriodicWallMaxAmplitude}!Environment@{Environment}}
\subsubsection[{setPeriodicWallMaxAmplitude}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::setPeriodicWallMaxAmplitude (
\begin{DoxyParamCaption}
\item[{const ngl::Real}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_a505b45d602f5d65a88c8e3a421701ab3}


set the maximum amplitude of the periodic wall 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new value \\
\hline
\end{DoxyParams}


Definition at line 176 of file Environment.h.



References m\_\-periodicWallMaxAmplitude.


\begin{DoxyCode}
{ m_periodicWallMaxAmplitude = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a505b45d602f5d65a88c8e3a421701ab3_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_ac8ab07b9267ab1a17269d5909dce7586}{
\index{Environment@{Environment}!setPeriodicWallSpeed@{setPeriodicWallSpeed}}
\index{setPeriodicWallSpeed@{setPeriodicWallSpeed}!Environment@{Environment}}
\subsubsection[{setPeriodicWallSpeed}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::setPeriodicWallSpeed (
\begin{DoxyParamCaption}
\item[{const ngl::Real}]{\_\-v}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_environment_ac8ab07b9267ab1a17269d5909dce7586}


set the angle speed factor of the periodic wall 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-v} & the new value \\
\hline
\end{DoxyParams}


Definition at line 180 of file Environment.h.



References m\_\-periodicWallSpeed.


\begin{DoxyCode}
{ m_periodicWallSpeed = _v; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_ac8ab07b9267ab1a17269d5909dce7586_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a408cbde98b479f6a5c8779c9d66c62ba}{
\index{Environment@{Environment}!updateObstacles@{updateObstacles}}
\index{updateObstacles@{updateObstacles}!Environment@{Environment}}
\subsubsection[{updateObstacles}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::updateObstacles (
\begin{DoxyParamCaption}
\item[{{\bf Integration} $\ast$}]{\_\-integration}
\end{DoxyParamCaption}
)}}
\label{class_environment_a408cbde98b479f6a5c8779c9d66c62ba}


update the rigid bodies movements and rotations at every simulation iteration 



Definition at line 138 of file Environment.cpp.



References checkAndResolveCollision(), Particle::getMoveable(), Integration::integrateNext(), m\_\-capsuleObstacleList, m\_\-obstacleEnabled, m\_\-periodicWallEnabled, m\_\-sphereObstacleList, Configuration::s\_\-accelerationOfFreeFall, Particle::setAcceleration(), updatePeriodicBoundingBox(), and Capsule::updateRotation().


\begin{DoxyCode}
{
    //update periodic wall if enabled
    if (m_periodicWallEnabled) updatePeriodicBoundingBox();

    //obstacles movement and collision handling if enabled
    if (m_obstacleEnabled)
    {
        //update capsule obstacles
        BOOST_FOREACH(Capsule& obstacle, m_capsuleObstacleList)
        {
            if (obstacle.getMoveable())
            {
                //rotate capsule
                obstacle.updateRotation();

                //no collision check for capsule against others
            }
        }

        //update sphere obstacles
        BOOST_FOREACH(Particle& obstacle, m_sphereObstacleList)
        {
            //calculate acceleration due to gravity
            obstacle.setAcceleration(ngl::Vector(0, 
      Configuration::s_accelerationOfFreeFall, 0));

            if (obstacle.getMoveable())
            {
                //determine next (position, velocity) of obstacle
                _integration->integrateNext(obstacle);

                //check and resolve collision
                bool hitBoundary; bool hitRBD;
                checkAndResolveCollision(obstacle, hitBoundary, hitRBD, true);
            }
        }

    }
}
\end{DoxyCode}


Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a408cbde98b479f6a5c8779c9d66c62ba_cgraph}
\end{center}
\end{figure}




Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a408cbde98b479f6a5c8779c9d66c62ba_icgraph}
\end{center}
\end{figure}


\hypertarget{class_environment_a333832554a94d3593f4b6eea1706bcb4}{
\index{Environment@{Environment}!updatePeriodicBoundingBox@{updatePeriodicBoundingBox}}
\index{updatePeriodicBoundingBox@{updatePeriodicBoundingBox}!Environment@{Environment}}
\subsubsection[{updatePeriodicBoundingBox}]{\setlength{\rightskip}{0pt plus 5cm}void Environment::updatePeriodicBoundingBox (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a333832554a94d3593f4b6eea1706bcb4}


update the periodic wall position at each iteration 



Definition at line 445 of file Environment.cpp.



References m\_\-angleOfPeriodicWall, m\_\-boundaryBBox, m\_\-boundaryDimension, m\_\-boundaryPosition, m\_\-periodicWallAngleIncrement, m\_\-periodicWallMaxAmplitude, and m\_\-periodicWallSpeed.


\begin{DoxyCode}
{
    //increment angle
    m_angleOfPeriodicWall += m_periodicWallAngleIncrement;

    //convert degrees to radians
    ngl::Real angle = m_angleOfPeriodicWall * (M_PI / 180.0);

    //get amplitude from sin function
    ngl::Real amplitude = sin(m_periodicWallSpeed * angle) * 
      m_periodicWallMaxAmplitude;

    //determine new center
    ngl::Vector newCenter = m_boundaryPosition;
    newCenter.m_x += (amplitude / 2.0);

    //determine new box width
    ngl::Real newWidth = m_boundaryDimension.m_x + amplitude;

    //update bounding box (cannot resize it dynamically -> only way is to re-crea
      te it!!!!)
    delete m_boundaryBBox;
    m_boundaryBBox = new ngl::BBox(newCenter, newWidth, m_boundaryDimension.m_y, 
      m_boundaryDimension.m_z);
}
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_environment_a333832554a94d3593f4b6eea1706bcb4_icgraph}
\end{center}
\end{figure}




\subsection{Member Data Documentation}
\hypertarget{class_environment_af45c5aeb2abab400ed3d4bf4925d45fe}{
\index{Environment@{Environment}!m\_\-angleOfPeriodicWall@{m\_\-angleOfPeriodicWall}}
\index{m\_\-angleOfPeriodicWall@{m\_\-angleOfPeriodicWall}!Environment@{Environment}}
\subsubsection[{m\_\-angleOfPeriodicWall}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real {\bf Environment::m\_\-angleOfPeriodicWall}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_af45c5aeb2abab400ed3d4bf4925d45fe}


angle of the periodic wall sine function 



Definition at line 235 of file Environment.h.

\hypertarget{class_environment_a07577ebc459b623a9c052d53053eae22}{
\index{Environment@{Environment}!m\_\-boundaryBBox@{m\_\-boundaryBBox}}
\index{m\_\-boundaryBBox@{m\_\-boundaryBBox}!Environment@{Environment}}
\subsubsection[{m\_\-boundaryBBox}]{\setlength{\rightskip}{0pt plus 5cm}ngl::BBox$\ast$ {\bf Environment::m\_\-boundaryBBox}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a07577ebc459b623a9c052d53053eae22}


boundary bounding box object used for collision handling 



Definition at line 202 of file Environment.h.

\hypertarget{class_environment_a93e2d3b73f88875a9e3ad783a9093966}{
\index{Environment@{Environment}!m\_\-boundaryBoundTop@{m\_\-boundaryBoundTop}}
\index{m\_\-boundaryBoundTop@{m\_\-boundaryBoundTop}!Environment@{Environment}}
\subsubsection[{m\_\-boundaryBoundTop}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Environment::m\_\-boundaryBoundTop}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a93e2d3b73f88875a9e3ad783a9093966}


flag to determine if the top face of the boundary is closed 



Definition at line 205 of file Environment.h.

\hypertarget{class_environment_a5be7e841d07b7d5b6e2300b9c7ce5977}{
\index{Environment@{Environment}!m\_\-boundaryDimension@{m\_\-boundaryDimension}}
\index{m\_\-boundaryDimension@{m\_\-boundaryDimension}!Environment@{Environment}}
\subsubsection[{m\_\-boundaryDimension}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Environment::m\_\-boundaryDimension}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a5be7e841d07b7d5b6e2300b9c7ce5977}


boundary dimension 



Definition at line 196 of file Environment.h.

\hypertarget{class_environment_a0cd3f00365165a6bb63295fe0c998b7b}{
\index{Environment@{Environment}!m\_\-boundaryPosition@{m\_\-boundaryPosition}}
\index{m\_\-boundaryPosition@{m\_\-boundaryPosition}!Environment@{Environment}}
\subsubsection[{m\_\-boundaryPosition}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Vector {\bf Environment::m\_\-boundaryPosition}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a0cd3f00365165a6bb63295fe0c998b7b}


boundary centre position 



Definition at line 199 of file Environment.h.

\hypertarget{class_environment_a39f2ed7926432be08121985545a1dcee}{
\index{Environment@{Environment}!m\_\-boundaryRestitutionCoefficientForFluid@{m\_\-boundaryRestitutionCoefficientForFluid}}
\index{m\_\-boundaryRestitutionCoefficientForFluid@{m\_\-boundaryRestitutionCoefficientForFluid}!Environment@{Environment}}
\subsubsection[{m\_\-boundaryRestitutionCoefficientForFluid}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real {\bf Environment::m\_\-boundaryRestitutionCoefficientForFluid}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a39f2ed7926432be08121985545a1dcee}


restitution coefficient for fluid interaction with boundary 



Definition at line 208 of file Environment.h.

\hypertarget{class_environment_a7a6faf1d8355d4b90302b8593eb0afca}{
\index{Environment@{Environment}!m\_\-boundaryRestitutionCoefficientForRBD@{m\_\-boundaryRestitutionCoefficientForRBD}}
\index{m\_\-boundaryRestitutionCoefficientForRBD@{m\_\-boundaryRestitutionCoefficientForRBD}!Environment@{Environment}}
\subsubsection[{m\_\-boundaryRestitutionCoefficientForRBD}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real {\bf Environment::m\_\-boundaryRestitutionCoefficientForRBD}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a7a6faf1d8355d4b90302b8593eb0afca}


restitution coefficient for RBD interaction with boundary 



Definition at line 211 of file Environment.h.

\hypertarget{class_environment_ae8f7d7f843b540a13fd3b0b9334235c9}{
\index{Environment@{Environment}!m\_\-capsuleObstacleList@{m\_\-capsuleObstacleList}}
\index{m\_\-capsuleObstacleList@{m\_\-capsuleObstacleList}!Environment@{Environment}}
\subsubsection[{m\_\-capsuleObstacleList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf Capsule}$>$ {\bf Environment::m\_\-capsuleObstacleList}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_ae8f7d7f843b540a13fd3b0b9334235c9}


list of capsule RBD 



Definition at line 220 of file Environment.h.

\hypertarget{class_environment_aad6f0b85e8548665495fd4d7b20e3b78}{
\index{Environment@{Environment}!m\_\-capsuleResolution@{m\_\-capsuleResolution}}
\index{m\_\-capsuleResolution@{m\_\-capsuleResolution}!Environment@{Environment}}
\subsubsection[{m\_\-capsuleResolution}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf Environment::m\_\-capsuleResolution}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_aad6f0b85e8548665495fd4d7b20e3b78}


resolution of the capsule drawing (the number of spheres used to draw the capsule) 



Definition at line 223 of file Environment.h.

\hypertarget{class_environment_af32284dfd212ba085e2f440b8d3e887b}{
\index{Environment@{Environment}!m\_\-obstacleEnabled@{m\_\-obstacleEnabled}}
\index{m\_\-obstacleEnabled@{m\_\-obstacleEnabled}!Environment@{Environment}}
\subsubsection[{m\_\-obstacleEnabled}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Environment::m\_\-obstacleEnabled}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_af32284dfd212ba085e2f440b8d3e887b}


flag to determine if RBD interaction is enabled 



Definition at line 193 of file Environment.h.

\hypertarget{class_environment_a455f9bec84b6ab1cf4a16e656ef80767}{
\index{Environment@{Environment}!m\_\-obstacleRestitutionCoefficient@{m\_\-obstacleRestitutionCoefficient}}
\index{m\_\-obstacleRestitutionCoefficient@{m\_\-obstacleRestitutionCoefficient}!Environment@{Environment}}
\subsubsection[{m\_\-obstacleRestitutionCoefficient}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real {\bf Environment::m\_\-obstacleRestitutionCoefficient}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a455f9bec84b6ab1cf4a16e656ef80767}


restitution coefficient for fluid interaction with RBD 



Definition at line 214 of file Environment.h.

\hypertarget{class_environment_a476cdd11550b1ddd4e4ebdfd476f0935}{
\index{Environment@{Environment}!m\_\-periodicWallAngleIncrement@{m\_\-periodicWallAngleIncrement}}
\index{m\_\-periodicWallAngleIncrement@{m\_\-periodicWallAngleIncrement}!Environment@{Environment}}
\subsubsection[{m\_\-periodicWallAngleIncrement}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real {\bf Environment::m\_\-periodicWallAngleIncrement}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a476cdd11550b1ddd4e4ebdfd476f0935}


angle increment of the periodic wall sine function 



Definition at line 238 of file Environment.h.

\hypertarget{class_environment_a404ae3005acb08157e6f088ec75ad572}{
\index{Environment@{Environment}!m\_\-periodicWallEnabled@{m\_\-periodicWallEnabled}}
\index{m\_\-periodicWallEnabled@{m\_\-periodicWallEnabled}!Environment@{Environment}}
\subsubsection[{m\_\-periodicWallEnabled}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf Environment::m\_\-periodicWallEnabled}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a404ae3005acb08157e6f088ec75ad572}


flag to determine whether the boundary periodic wall is enabled 



Definition at line 226 of file Environment.h.

\hypertarget{class_environment_a574f3d158100780338c7212fd38ddac2}{
\index{Environment@{Environment}!m\_\-periodicWallMaxAmplitude@{m\_\-periodicWallMaxAmplitude}}
\index{m\_\-periodicWallMaxAmplitude@{m\_\-periodicWallMaxAmplitude}!Environment@{Environment}}
\subsubsection[{m\_\-periodicWallMaxAmplitude}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real {\bf Environment::m\_\-periodicWallMaxAmplitude}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_a574f3d158100780338c7212fd38ddac2}


maximum amplitude of the periodic wall 



Definition at line 229 of file Environment.h.

\hypertarget{class_environment_ae5dd1d7a4c45ea35f42d15278eb04ed4}{
\index{Environment@{Environment}!m\_\-periodicWallSpeed@{m\_\-periodicWallSpeed}}
\index{m\_\-periodicWallSpeed@{m\_\-periodicWallSpeed}!Environment@{Environment}}
\subsubsection[{m\_\-periodicWallSpeed}]{\setlength{\rightskip}{0pt plus 5cm}ngl::Real {\bf Environment::m\_\-periodicWallSpeed}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_ae5dd1d7a4c45ea35f42d15278eb04ed4}


angle speed factor of the periodic wall 



Definition at line 232 of file Environment.h.

\hypertarget{class_environment_ad8fd964bb76cf7d3621109a890cf5113}{
\index{Environment@{Environment}!m\_\-sphereObstacleList@{m\_\-sphereObstacleList}}
\index{m\_\-sphereObstacleList@{m\_\-sphereObstacleList}!Environment@{Environment}}
\subsubsection[{m\_\-sphereObstacleList}]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf Particle}$>$ {\bf Environment::m\_\-sphereObstacleList}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_environment_ad8fd964bb76cf7d3621109a890cf5113}


list of sphere RBD 



Definition at line 217 of file Environment.h.



The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
include/\hyperlink{_environment_8h}{Environment.h}\item 
src/\hyperlink{_environment_8cpp}{Environment.cpp}\end{DoxyCompactItemize}
